import { View } from "@tarojs/components";
import React, { useState } from "react";

export default function Classify() {
  const classify = ["名厨", "总厨", "匠人", "大师", "尊师", "企业家"];
  const [activeClassify, setActiveClassify] = useState("");
  return (
    <View className="classify">
      {classify.map((item, index) => {
        return (
          <View
            className={activeClassify === item ? "activeClassify p" : "p"}
            onClick={() => setActiveClassify(item)}
            key={index}
          >
            {item}
          </View>
        );
      })}
    </View>
  );
}
